New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React Native Implement Basic text Toolbar actions #9267
Conversation
return accFormats; | ||
}, {} ); | ||
|
||
this.setState( { newFormats, selectedNodeId: this.state.selectedNodeId + 1 } ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonder why it's needed selectedNodeId: this.state.selectedNodeId + 1
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy pasted from the GB web... @gziolo you know why is this?
@@ -21,12 +21,20 @@ import { children } from '@wordpress/blocks'; | |||
import FormatToolbar from './format-toolbar'; | |||
import { FORMATTING_CONTROLS } from './formatting-controls'; | |||
|
|||
export function getFormatValue( formatName ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gziolo I wonder why we need to export this function here. Can 't it be moved in RichText
component since it's only used there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is exported only to be used in tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good Sergio!
There are some problems on Android but I think those are on react-native-aztec only. We will get it sorted in another PR.
Looks good, let's iterate on |
Description
Refs: wordpress-mobile/gutenberg-mobile#128
This PR implements the connection of the toolbar with the richtext component in React Native.
How has this been tested?
Screenshots
Types of changes
Checklist: